package gui;

import java.awt.Dimension;

import mvc.bezier.ControllerBezier2D;
import mvc.bezier.ControllerBezier3D;
import mvc.bezier.ModelBezier;
import mvc.bezier.ViewCurveBezier2D;
import mvc.bezier.ViewCurveBezier3D;

import org.geom.curve.bezier.Bezier;
import org.gui.MainWindow;
import org.render.CurveRenderer2D;
import org.render.CurveRenderer3D;

public class BezierMainWindow extends MainWindow {private static final long serialVersionUID = 1L;
	//---------------------------------------------------------------------- class vars
	
	Dimension viewDimension = new Dimension(250,250);


	public BezierMainWindow(String string) {
		super(string, new ModelBezier(new Bezier(2)));	
		
		init();
	}
	
	private void init() {
		
		createView(viewDimension, "piano xy", ViewCurveBezier2D.class,
				   new CurveRenderer2D(CurveRenderer2D.X),
				   ControllerBezier2D.class, CurveRenderer2D.X);
		createView(viewDimension, "piano xz", ViewCurveBezier2D.class,
				   new CurveRenderer2D(CurveRenderer2D.Y),
				   ControllerBezier2D.class, CurveRenderer2D.Y);
		createView(viewDimension, "piano zy", ViewCurveBezier2D.class,
				   new CurveRenderer2D(CurveRenderer2D.Z),
				   ControllerBezier2D.class, CurveRenderer2D.Z);
		createView(viewDimension, "vista completa", ViewCurveBezier3D.class,
				new CurveRenderer3D(curve, viewDimension),
				 ControllerBezier3D.class, "");
	
	}

}
